home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-02
/
tool-inc.zip
/
BAKFILE.INC
< prev
next >
Wrap
Text File
|
1990-02-18
|
696b
|
28 lines
(*
* Copyright 1987, 1989 Samuel H. Smith; All rights reserved
*
* This is a component of the ProDoor System.
* Do not distribute modified versions without my permission.
* Do not remove or alter this notice or any other copyright notice.
* If you use this in your own program you must distribute source code.
* Do not use any of this in a commercial product.
*
*)
{rename file.xxx to file.bak}
procedure backup_file(name: anystring);
var
fd1,fd2: file;
bakname: anystring;
begin
bakname := remove_ext(name) + '.BAK';
assign(fd1,bakname);
{$i-} erase(fd1); {$i+}
if ioresult <> 0 then ;
assign(fd1,name);
rename(fd1,bakname);
end;